<?php
namespace app\zhongcan\model;
use think\Model;

class NewsModel extends Model{
    protected $name = 'news';
    protected $autoWriteTimestamp = 'datetime';
    //获取器，修改状态值
    public function getSwitchAtrr($value){
        $status = ['1'=>'是','0'=>'否'];
        return $status[$value];
    }
}